home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 33
/
Amiga Format AFCD33 (Issue 117, Dec 1998).iso
/
-seriously_amiga-
/
archivers
/
amignutar
/
tar.man
< prev
Wrap
Text File
|
1998-09-07
|
8KB
|
186 lines
NAME
tar - media file archiver
SYNOPSIS
tar -[BcDhikmopstvxzZ] [-b N] [-f F] [-T F] [ filename ... ]
DESCRIPTION
tar provides a way to store many files into a single
archive, which can be kept in another file, stored on
an I/O device such as tape, floppy, cartridge, or disk, or
piped to another program. It is useful for making backup
copies, or for packaging up a set of files to move them to
another system.
When reading an archive, this version of tar continues after
finding an error. Previous versions required the `i' option
to ignore checksum errors.
OPTIONS
tar options can be specified in either of two ways. The
usual Unix conventions can be used: each option is preceded
by `-'; arguments directly follow each option; multiple
options can be combined behind one `-' as long as they take
no arguments. For compatability with the Unix tar program,
the options may also be specified as ``keyletters,'' wherein
all the option letters occur in the first argument to tar,
with no `-', and their arguments, if any, occur in the
second, third, ... arguments. Examples:
Normal: tar -f arcname -cv file1 file2
Old: tar fcv arcname file1 file2
At least one of the -c, -t, or -x options must be included.
The rest are optional.
Files to be operated upon are specified by a list of file
names, which follows the option specifications (or can be
read from a file by the -T option). Specifying a directory
name causes that directory and all the files it contains to
be (recursively) processed. In general, specifying full
path names when creating an archive is a bad idea, since
when the files are extracted, they will have to be extracted
into exactly where they were dumped from. Instead, cd to
the root directory and use relative file names.
-b N Specify a blocking factor for the archive. The block
size will be N x 512 bytes. Larger blocks typically
run faster and let you fit more data on a tape. The
default blocking factor is set when tar is compiled,
and is typically 20. There is no limit to the maximum
block size, as long as enough memory can be allocated
for it, and as long as the device containing the
archive can read or write that block size.
-B When reading an archive, reblock it as we read it.
Normally, tar reads each block with a single read(2)
system call. This does not work when reading from a
pipe or network socket under Berkeley Unix. With this
option, it will do multiple read(2)s until it gets
enough data to fill the specified block size. -B can
also be used to speed up the reading of tapes that were
written with small blocking factors, by specifying a
large blocking factor with -b and having tar read many
small blocks into memory before it tries to process
them.
-c Create an archive from a list of files.
-D With each message that tar produces, print the record
number within the archive where the message occurred.
This option is especially useful when reading damaged
archives, since it helps to pinpoint the damaged sec-
tion.
-f F Specify the filename of the archive. If the specified
filename is ``-'', the archive is read from the stan-
dard input or written to the standard output. If this
option is not used, a default archive name (which was
picked when tar was compiled) is used. The default is
normally set to the ``first'' tape drive or other tran-
sportable I/O medium on the system.
-h When creating an archive, if a symbolic link is encoun-
tered, dump the file or directory to which it points,
rather than dumping it as a symbolic link.
-i When reading an archive, ignore blocks of zeros in the
archive. Normally a block of zeros indicates the end
of the archive, but in a damaged archive, or one which
was created by appending several archives, this option
allows tar to continue. It is not on by default
because there is garbage written after the zeroed
blocks by the Unix tar program.
-k When extracting files from an archive, keep existing
files, rather than overwriting them with the version
from the archive.
-m When extracting files from an archive, set each file's
modified timestamp to the current time, rather than
extracting each file's modified timestamp from the
archive.
-o When creating an archive, write an old format archive,
which does not include information about directories,
pipes, or device files, and specifies file ownership by
uid's and gid's rather than by user names and group
names. In most cases, a ``new'' format archive can be
read by an ``old'' tar program without serious trouble,
so this option should seldom be needed.
-p When extracting files from an archive, restore them to
the same permissions that they had in the archive. If
-p is not specified, the current umask limits the per-
missions of the extracted files. See umask(2).
-t List a table of contents of an existing archive. If
file names are specified, just list files matching the
specified names.
-s When specifying a list of filenames to be listed or
extracted from an archive, the -s flag specifies that
the list is sorted into the same order as the tape.
This allows a large list to be used, even on small
machines, because the entire list need not be read into
memory at once. Such a sorted list can easily be
created by running ``tar -t'' on the archive and edit-
ing its output.
-T F Rather than specifying the file names to operate on as
arguments to the tar command, this option specifies
that the file names should be read from the file F, one
per line. If the file name specified is ``-'', the
list is read from the standard input. This option, in
conjunction with the -s option, allows an arbitrarily
large list of files to be processed, and allows the
list to be piped to tar.
-v Be verbose about the files that are being processed or
listed. Normally, archive creation or file extraction
are silent, and archive listing just gives file names.
The -v option causes an ``ls -l''-like listing to be
produced.
-x Extract files from an existing archive. If file name
are specified, just extract files matching the speci-
fied names, otherwise extract all the files in the
archive.
-z or -Z
When extracting or listing an archive, these options
specify that the archive should be decompressed while
it is read, using the -d option of the compress(1) pro-
gram. The archive itself is not modified.
BUGS
The r, u, w, X, l, F, C, and digit options of Unix tar are
not supported.
It should be possible to create a compressed archive with
the -z option.
NOTES ON AMIGA VERSION:
The following notes appeared together with the GCC port of V1.09.
You'd have to check out by yourself, whether these are still
valid for the SAS/C V1.11.2 port. -AK, 16 Sep 95
Addendum for Version 1.1:
The -p option for extracting files with their dates
preserved is now supported (under AmigaDos 1.2 only; do not
try to use this option under AmigaDos 1.1).
Addendum for Version 1.2:
The -p option now works on floppies as well as ram:. Various
internal hacking has been done, and things are slightly
different than before. The date conversion is now aware that
it's summertime, and not wintertime (a change noticble only
to people who've been porting tar archives back and forth
between Unix and the Amiga).